package com.whfc.fse.param.msg;

import lombok.Data;

import java.util.Date;

/**
 * @Description: 塔机设备报警拍照上传
 * @author: xugcheng
 * @version: 1.0
 * @date: 2020/5/21 14:32
 */
@Data
@Deprecated
public class FseMsg0x0203 extends FseMsg {

    /**
     * 服务器时间
     */
    private Date time;

    /**
     * 吊重
     */
    private float weight;

    /**
     * 幅度
     */
    private float range;

    /**
     * 高度
     */
    private float height;

    /**
     * 回转角度(度)
     */
    private float turnAngle;

    /**
     * 额定重量(吨)
     */
    private float ratedWeight;

    /**
     * 力矩百分比
     */
    private float momentPercent;

    /**
     * 风速(m/s)
     */
    private float windSpeed;

    /**
     * 前倾角(度)
     */
    private float dipAngle;

    /**
     * 塔机状态
     */
    private long craneStatus;

    /**
     * 图片数据
     */
    private byte[] imageBytes;

    /**
     * 平台通用响应
     */
    private Integer reply;

    public FseMsg0x0203() {
        this.setFrameHeader(FseMsgConst.FRAME_START_FALG);
        this.setOpType(FseMsgConst.OP_TYPE_R);
        this.setCmd(FseMsgConst.FSE_UP_CMD_0X0203);
    }

    public void setImageBytes(byte[] imageBytes) {
        this.imageBytes = imageBytes;
        this.setDataLenth(43 + imageBytes.length);
    }

    public void setReply(Integer reply) {
        this.reply = reply;
        this.setDataLenth(1);
    }
}
